//
//  HomeRoomDetailCell.m
//  AILock
//
//  Created by 谭亚明 on 2020/7/30.
//  Copyright © 2020 tym. All rights reserved.
//

#import "HomeRoomDetailCell.h"
#import "UIImageView+YPImage.h"
@interface HomeRoomDetailCell ()

@property(nonatomic,strong) UIImageView *headImage;
@property(nonatomic,strong) UILabel *nameLab;
@end

@implementation HomeRoomDetailCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    [self initUI];
    return self;
}

-(void)initUI{
    
    _headImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0,98, 84)];
    _headImage.backgroundColor = rgba(246, 245, 246);
    _headImage.contentMode = UIViewContentModeScaleAspectFill;
    [self.contentView addSubview:_headImage];
    
    _nameLab = [TYMLabel lb_text:@"tes" font:Font_Medium(17) color:rgba(74, 74, 74)];
    _nameLab.frame = CGRectMake(118, 32, 150, 20);
    [self.contentView addSubview:_nameLab];
}

-(void)setEquipModel:(EquipmentModel *)equipModel{
    self.nameLab.text = equipModel.equipmentName;
    
    [self.headImage yp_setImageUlr:[equipModel getEquipmentImage]];
}

+(NSString*)identifier{
    return @"HomeRoomDetailCell";
}


+(CGFloat)cellForHeight{
    return 84;
}

@end
